// type TupleToString<T extends any[], S extends string = ""> = T extends [
//   infer L,
//   ...infer R
// ]
//   ? L extends string | number | null | undefined | bigint | boolean
//     ? TupleToString<R, `${S}${L}`>
//     : never
//   : S;

// type A = TupleToString<["a", "b", "c"]>; // 'abc'
// type B = TupleToString<["a"]>; // 'a'
// type C = TupleToString<[]>; // ''
// type D = TupleToString<[1, 2, 3]>; // ''
export {};
//将字符串类型的元素转换为字符串字面量类型
export type TupleToString<T extends any[], F extends string = ""> = T extends [
  infer L,
  ...infer R
]
  ? TupleToString<R, `${F}${L & string}`>
  : F;
type A = TupleToString<["a", "b", "c"]>; // "abc
type B = TupleToString<["a"]>; // 'a'
type c = TupleToString<[]>; //""
export {};
